package com.galaxy.order.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.galaxy.common.mybatis.core.mapper.BaseMapperPlus;
import com.galaxy.order.domain.Order;
import com.galaxy.order.domain.vo.OrderVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OrderMapper extends BaseMapperPlus<Order, OrderVo> {

    /**
     * 查询订单列表
     *
     * @param bo 查询条件
     * @return 订单列表
     */
    List<OrderVo> selectOrderVoList(@Param("orderNo") String orderNo,
                                     @Param("userId") Long userId,
                                     @Param("status") Integer status,
                                     @Param("size") long size,
                                    @Param("current") long current);

    Page<OrderVo> selectOrderVoList1(@Param("orderNo") String orderNo,
                                     @Param("userId") Long userId,
                                     @Param("status") Integer status,
                                     Page<OrderVo> page);

    /**
     * 查询单个订单
     *
     * @param id 订单ID
     * @return 订单信息
     */
    OrderVo selectOrderVoById(@Param("id") Long id);


    OrderVo selectOrderVoByOrderNo(@Param("orderNo") String orderNo);
}
